// 1.引入express包
const express = require("express");
// 2.使用Router来创建路由
const router = express.Router();
// 3.引入控制器模块
const controller = require("../controllers/ctrlResult");

// 配置路由
// 跳转导航页面
router.get("/", controller.index);
router.get("/index", controller.index);
router.get("/index.html", controller.index);
router.get("/about", controller.about);
router.get("/cnt", controller.cnt);
router.get("/ctm", controller.ctm);
router.get("/gie", controller.gie);
router.get("/join", controller.join);
router.get("/news", controller.news);
router.get("/org", controller.org);

// 文章
router.get("/article/:id", controller.article);

// 男装加盟二级页面
router.get("/join/advan", controller.advan);
router.get("/join/trem", controller.trem);
router.get("/join/flow", controller.flow);
router.get("/join/policy", controller.policy);

// 男装定制产品二级页面
router.get("/ctm/xz", controller.ctm2);
router.get("/ctm/tx", controller.ctm2);
router.get("/ctm/dx", controller.ctm2);
router.get("/ctm/swxz", controller.ctm2);
router.get("/ctm/xk", controller.ctm2);
router.get("/ctm/cs", controller.ctm2);
router.get("/ctm/dy", controller.ctm2);
router.get("/ctm/px", controller.ctm2);
router.get("/ctm/pd", controller.ctm2);
router.get("/ctm/ml", controller.ctm2);

// 新闻中心二级页面
router.get("/news/dynamic", controller.news);
router.get("/news/infor", controller.news);
router.get("/news/faq", controller.news);

// 门店运营二级页面
router.get("/org/site", controller.org);
router.get("/org/design", controller.org);
router.get("/org/oper", controller.org);

// 男装定制产品三级页面
router.get("/ctm/px/jt", controller.ctm3);
router.get("/ctm/px/xft", controller.ctm3);
router.get("/ctm/px/yt", controller.ctm3);
router.get("/ctm/pd/np", controller.ctm3);
router.get("/ctm/pd/ey", controller.ctm3);
router.get("/ctm/ml/zegna", controller.ctm3);
router.get("/ctm/ml/Filarte", controller.ctm3);
router.get("/ctm/ml/china", controller.ctm3);
router.get("/ctm/ml/1881", controller.ctm3);

// // 渲染导航
router.get("/showNav", controller.showNav);
router.get("/pageNav", controller.showNav);

// 暴露路由
module.exports = router;
